package com.hugang.system;

import java.util.Arrays;
import java.util.Map;
import java.util.Set;

/**
 * System类的使用
 *
 * @author hg
 * @date 2020/6/17 19:20
 */
public class SystemTest {

    public static void main(String[] args) {
        Map<String, String> getenv = System.getenv();
        Set<Map.Entry<String, String>> entries = getenv.entrySet();
        System.out.println(Arrays.toString(entries.toArray()));

        System.out.println(System.getProperty("java.home"));
        System.out.println(System.getProperty("java.version"));
        System.out.println(System.getProperty("os.name"));
        System.out.println(System.getProperty("os.version"));
    }
}
